/*
 * @Author: 王灿
 * @Date: 2019-11-09 00:40:05
 * @LastEditTime : 2020-01-08 10:54:26
 * @Description: 订单
 * @FilePath: \scarlet-sparrow-admin\src\api\order.js
 */
import request from '@/utils/request'

// 订单列表
export function getOrderList(data) {
    return request({
        url: '/order/order_list',
        method: 'post',
        data
    })
}

// 国际订单
export function getOrderInternetion(data) {
    return request({
        url: '/internetion/internetion_list',
        method: 'post',
        data
    })
}

// 订单导出token
export function getExportToken(data) {
    return request({
        url: '/token/get_token',
        method: 'post',
        data
    })
}

// 订单导出
export function getOrderExport(data) {
    return request({
        url: '/excel/order',
        method: 'post',
        data
    })
}

// 发货
export function getOrderDeliver(data) {
    return request({
        url: '/order/deliver_goods',
        method: 'post',
        data
    })
}

// 手动结算订单
export function getOrderManual(data) {
    return request({
        url: '/order/manual_settlement',
        method: 'post',
        data
    })
}

// 订单收获列表
export function getAddressList(data) {
    return request({
        url: '/customer/address_list',
        method: 'post',
        data,
        isLogin: true
    })
}


// 订单退货列表
export function getRefundList(data) {
    return request({
        url: '/order/list_refund',
        method: 'post',
        data
    })
}

// 订单退货列表
export function getAddressUpdate(data) {
    return request({
        url: '/order/upd_order_address',
        method: 'post',
        data
    })
}

// 订单退货批准
export function getRefundApproval(data) {
    return request({
        url: '/order/return_approval',
        method: 'post',
        data
    })
}

// 订单退货驳回
export function getRefundReject(data) {
    return request({
        url: '/order/return_reject',
        method: 'post',
        data
    })
}

// 订单退货完成
export function getRefundFinish(data) {
    return request({
        url: '/order/return_finish',
        method: 'post',
        data
    })
}

// 评价列表
export function getEvaluateList(data) {
    return request({
        url: '/product/list_evaluate',
        method: 'post',
        data
    })
}

// 评价新增
export function getEvaluateAdd(data) {
    return request({
        url: '/product/add_evaluate',
        method: 'post',
        data
    })
}

// 评价新增
export function getEvaluateUpdate(data) {
    return request({
        url: '/product/update_evaluate',
        method: 'post',
        data
    })
}

// 提现列表
export function getWithdrawList(data) {
    return request({
        url: '/user/user_withdraw_list',
        method: 'post',
        data,
        isLogin: true
    })
}

// 提现通过/驳回
export function getUpdateStatus(data) {
    return request({
        url: '/user/update_status',
        method: 'post',
        data,
        isLogin: true
    })
}